var Mongoose = require('mongoose');

var complexIdeaSchema = Mongoose.Schema({
    content: {
        type: String,
        default: ''
    },
    idea: {
        type: Mongoose.Schema.ObjectId,
        ref: 'Idea'
    },
    user: {
        type: Mongoose.Schema.ObjectId,
        ref: 'User'
    }
}, {timestamps: true});

var ComplexIdea = Mongoose.model('ComplexIdea', complexIdeaSchema);

ComplexIdea.createComplexIdea = function (newIdea, callback) {
    newIdea.save(callback);
};

module.exports = ComplexIdea;